package com.utils
{
	public class URI
	{
		private static const PREFIX_IMAGE_TAG:String = 'assets/images/';
		private static const PREFIX_IMAGE_FISHS_TAG:String = 'assets/images/fishs/';
		private static const PREFIX_IMAGE_ICONS_TAG:String = 'assets/images/icons/';
		private static const PREFIX_IMAGE_MAP_TAG:String = 'assets/images/map/';
		
		private static const SUFFIX_IMAGE_TAG:String = '.png';
		
		private static const PREFIX_MUSIC_TAG:String = 'assets/musics/';
		private static const SUFFIX_MUSIC_TAG:String = '.mp3';
		
		private static const PREFIX_SWF_TAG:String = 'assets/panels/';
		private static const SUFFIX_SWF_TAG:String = '.swf';
		
		
		private static var _uri:URI;
		public function URI()
		{
			if(_uri){
				throw Error('URI不能重复创建实例!')
			}else{
				_uri = this;
			}
			trace('--->创建URI实例!');
		}
		
		public static function instance():URI{
			if(!_uri) _uri = new URI();
			return _uri;
		}
		
		/**swf路径*/		
		public function swfPath(name:String):String{
			return PREFIX_SWF_TAG + name + SUFFIX_SWF_TAG;
		}
		
		/**音乐路径*/		
		public function musicPath(name:String):String{
			return PREFIX_MUSIC_TAG + name + SUFFIX_MUSIC_TAG;
		}
		
		/**图片路径*/		
		public function imagePath(name:String):String{
			return PREFIX_IMAGE_TAG + name + SUFFIX_IMAGE_TAG;
		}
		
		/**鱼路径 */		
		public function fishPath(name:String):String{
			return PREFIX_IMAGE_FISHS_TAG + name + SUFFIX_IMAGE_TAG;
		}
		
		/**icon路径*/		
		public function iconPath(name:String):String{
			return PREFIX_IMAGE_ICONS_TAG + name + SUFFIX_IMAGE_TAG;
		}
		
		/**map路径*/		
		public function mapPath(name:String):String{
			return PREFIX_IMAGE_MAP_TAG + name + SUFFIX_IMAGE_TAG;
		}
		
		public function get shellPath():String{
			return PREFIX_IMAGE_MAP_TAG;
		}
		
	}
}